package com.test.pattern.visitor;

/**
 * @ClassName: Clinet
 * @description:
 * @author: Mr du
 * @create: 2024-03-17 22:47
 */
public class Clinet {

    public static void main(String[] args) {
        //创建home对象
        Home home = new Home();
        //给home对象添加元素
        home.add(new Dog());
        home.add(new Cat());

        //创建主人对象
        Owner owner = new Owner();
        home.aciton(owner);
        //创建其他人对象
        Someone someone = new Someone();
        home.aciton(someone);
    }
}
